#include "stdio.h"
#include "sys/types.h"
#include "sys/stat.h"
#include "fcntl.h"
#include "unistd.h"
#include "stdlib.h"


int main(int argc,int *argv[]){
    int fd;
    char buff[32];
    fd=open("/dev/LED_B",O_RDWR);
    if (fd<0)
    {
        perror("打开失败\n");
        return fd;
    }
    buff[0]=atoi(argv[1]);
    write(fd,buff,sizeof(buff));
    close(fd);
    return 0;
}